# Maintainer: Milan P. Stanić <mps@arvanta.net>
pkgname=dosbox
_pkgver=0.74-3
pkgver=${_pkgver/-/\.}
pkgrel=0
pkgdesc="DOS-emulator that uses SDL-library"
url="https://www.dosbox.com/"
arch="all !x86" # textrel issue on x86 
license="GPL-2.0-or-later"
makedepends="
	alsa-lib
	expat-dev
	libpng-dev
	libx11-dev
	libxau-dev
	libxcb-dev
	libdrm-dev
	libxext-dev
	libxfixes-dev
	libxdamage-dev
	libxxf86vm-dev
	libxshmfence-dev
	mesa-dev
	sdl-dev
	zlib-dev
	"

subpackages="$pkgname-doc"
source="https://downloads.sourceforge.net/dosbox/dosbox-$_pkgver.tar.gz"
builddir="$srcdir/"$pkgname-$_pkgver

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--disable-opengl
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="3770f1578e71730168fba01809585f2a05cf8c4d420524687ba28791d242faad294401bb9cd268bba725798e1db853551f274dc00a4024331f5dcef9f87f8f5f  dosbox-0.74-3.tar.gz"
